import React, { Component } from 'react';

import { Router, Route, Switch } from 'react-router-dom';
import history from 'unitls/history';
import AuthRoute from './pages/component/AuthRoute';
import Layout from './pages/Layout';
import login from './pages/login';
import TestPage from './pages/Test';
export default class App extends Component {
  render() {
    return (
      <Router history={history}>
        {/* <Switch>
          {/* <Redirect from="/" to="/home" exact></Redirect> */}
        {/* <Route path="/login" component={login}></Route>
          删除一级路由改成模糊匹配的路由 */}
        <Switch>
          <Route path="/test" component={TestPage}></Route>
          <Route path="/login" component={login}></Route>
          <AuthRoute path="/" component={Layout}></AuthRoute>
        </Switch>
      </Router>
    );
  }
}
